package com.uum.blog.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.uum.blog.pojo.entity.Blog;
import com.baomidou.mybatisplus.extension.service.IService;
import com.uum.blog.pojo.form.BlogForm;
import com.uum.blog.pojo.query.BlogPageQuery;
import com.uum.blog.pojo.vo.BlogVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;


public interface BlogService extends IService<Blog> {

    IPage<BlogVO> page(BlogPageQuery pageQuery);

    BlogVO detail(Long id);

    Boolean addBlog(BlogForm blog);

    Boolean updateBlog(BlogForm blog);

    String uploadMarkdownFile(MultipartFile fileData);

    Boolean delete(String ids);

    Map<String, Object> listBlogContributeCount();

    Map<String, Object> listCategoryPieData();

    Map<String, Object> listTagPieDate();

    List<Map<String, String>> listSuggest(String title);

    Boolean updateAuthorName(Long userId, String nickname);

    boolean settingBlog(Blog blog);

    BlogVO getTop();

}
